[MUON] fix computation of delta phi in MFT-MCH matching - #15796
Open
aferrero2707 wants to merge 1 commit into
Open
aferrero2707 wants to merge 1 commit into
aferrero2707 wants to merge 1 commit into
Conversation
The value of delta phi between the MFT and MCH tracks at the matching plane is restricted to the [-pi, pi] range, to fix the cases of large angular differences when the MFT and MCH tracks are at the opposite side of the horizontal plane at negative X values.
f3sch
reviewed
Sep 15, 2026
Comment on lines
892
to
+982
| @@ -926,6 +937,9 @@ MatchGlobalFwd::MatchGlobalFwd() | |||
| // Update Parameters | |||
| r_k_kminus1 = m_k - H_k * GlobalMuonTrackParameters; // Residuals of prediction | |||
|
|
|||
| // Restrict the phi residual to the [-pi, pi] range | |||
| r_k_kminus1[2] = constrainAngle(r_k_kminus1[2]); | |||
|
|
|||
| auto matchChi2Track = ROOT::Math::Similarity(r_k_kminus1, invResCov); | |||
|
|
|||
| return matchChi2Track; | |||
| @@ -963,6 +977,9 @@ MatchGlobalFwd::MatchGlobalFwd() | |||
| // Residuals of prediction | |||
| r_k_kminus1 = m_k - H_k * GlobalMuonTrackParameters; | |||
|
|
|||
| // Restrict the phi residual to the [-pi, pi] range | |||
| r_k_kminus1[2] = constrainAngle(r_k_kminus1[2]); | |||
|
|
|||
Collaborator
There was a problem hiding this comment.
Can you not just use the o2::math_utils::bringToPMPiGen(...) function?
Suggested change
| @@ -926,6 +937,9 @@ MatchGlobalFwd::MatchGlobalFwd() | |
| // Update Parameters | |
| r_k_kminus1 = m_k - H_k * GlobalMuonTrackParameters; // Residuals of prediction | |
| // Restrict the phi residual to the [-pi, pi] range | |
| o2::math_utils::bringToPMPiGen(r_k_kminus1[2]); | |
| auto matchChi2Track = ROOT::Math::Similarity(r_k_kminus1, invResCov); | |
| return matchChi2Track; | |
| @@ -963,6 +977,9 @@ MatchGlobalFwd::MatchGlobalFwd() | |
| // Residuals of prediction | |
| r_k_kminus1 = m_k - H_k * GlobalMuonTrackParameters; | |
| // Restrict the phi residual to the [-pi, pi] range | |
| o2::math_utils::bringToPMPiGen(r_k_kminus1[2]); |
Collaborator
|
Error while checking build/O2/fullCI_slc9 for 678aac3 at 2026-09-15 16:23: Full log here. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The value of delta phi between the MFT and MCH tracks at the matching plane is restricted to the [-pi, pi] range, to fix the cases of large angular differences when the MFT and MCH tracks are at the opposite side of the horizontal plane at negative X values.